The present invention relates to a method for generating a numerical calculation program in which a physical phenomenon represented by a partial differential equation is converted into a numerical expression and is schematically displayed (namely, simulated), and in particular, a method for generating a numerical calculation program suitable for simulating a distribution of physical quantity in a space, for example, for a distribution of an electromagnetic field, a thermal conduction analysis, and a fluidal analysis.
Since a numerical calculation program varies depending on the shape of a region to be simulated, an equation (a partial differential equation, in general) representing a physical rule dominating a physical phenomenon to be simulated, a condition on a boundary of the region, and so forth; a considerable amount of human power is required to generate such a program. It is therefore desirable to automatically generate the program based on a simple input data.
Conventionally, program languages and programs for generating a program have been proposed, for example, by Morris, S. M. et al, "SALEM-A Programming System for the Simulation of Systems Described by Partial Differential Equations", Proc. Fall Joint Computer Conf., vol. 33, pp. 353-357 (1968); Cardenas, A. F. et al, "A Language for Partial Differential Equations", Comm. ACM, vol. 13, No. 3, pp. 184-191 (1970.3); Rice, J. R. et al, "ELLPACK Progress and Plans in Elliptic Problem Solvers", pp. 135-162, Academic Press (1981); and IMSL Inc., "TWODEPEP; A Finite Element Program", 3rd ed. (1982).
In the prior art techniques, the form of partial differential equations and the shape of the region to be simulated are limited. To overcome this difficulty, there have been published a program language called Differential Equation Solver Language and a program for generating a numerical simulation program by use of the programming language. For example, Transactions of 26th Conference of Information Processing Society of Japan, pp. 427-428, 429-430, and 431-432 describe a method for generating a program to achieve a numerical calculation based on the finite difference calculus for partial differential equations to be simulated, and Transactions of 29th Conference of Information Processing Society of Japan, pp. 1519-1522 and 1523-1524 outline a method for generating a program to effect a numerical calculation based on the finite element method for equations to be simulated.
Details about the latter are disclosed by Japanese Patent Unexamined Publication No. 60-140433 filed by the present assignee.
In a calculation according to the finite element method, a two- or three-dimensional region to be subjected to the numerical calculation is divided into small triangular regions called elements and first-degree equations approximately equivalent to partial differential equations are determined for vertices (called nodes) of each element, thereby obtaining approximate solutions for unknown quantities at the nodes.
According to the technique disclosed by Japanese Patent Unexamined Publication No. 60-140433, when a numerical calculation program is generated from the results of the region division, data indicating the linkage information between the nodes is generated for each node and the program is generated by use of the data, thereafter the program is executed. As a result, the amount of the data increases in proportion to the number of the nodes, and the increase of data is particularly remarkable in a case of a region to be subjected to a three-dimensional simulation. This leads to a problem in that a memory having a considerably great capacity is necessary.
The conventional apparatus disclosed by the articles referenced above, however, have not disclosed a technique for automatically dividing a region into elements when the total numbers of division specified by the high level language for the opposing sides of the region are different.
Moreover, among the forms of the objective partial differential equations, only particular forms have been instantiated, namely, a technique for automatically generating a program to effect a numerical calculation for equations which vary according to the simulation model has not been disclosed.
Furthermore, the disclosed examples are associated with only particular boundary conditions, that is, a method for incorporating an arbitrary boundary condition has not been disclosed.